package ControlLayer;
import ModelLayer.*;


/**
 * Write a description of class SuppkierCtr here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class SupplierCtr
{
    private SupplierCont supplierCont;
    
    public SupplierCtr()
    {
        supplierCont = supplierCont.getSingelton();
    }

    
    public void createSupplier(String companyname, String city, String address, int postalcode, int eanr)
    {
        Supplier supplier = new Supplier(companyname, city, address, postalcode, eanr);
        supplierCont.createSupplier(supplier);
    }
    
    public Supplier findSupplier(int eanr)
    {
        return supplierCont.findSupplier(eanr);
    }
    
    public void updateSupplier(String companyname, String city, String address, int postalcode, int eanr)
    {
        supplierCont.updateSupplier(companyname, city, address, postalcode, eanr);
    }
    
    public void deleteSupplier(int eanr)
    {
        supplierCont.deleteSupplier(eanr);
    }
}
